//
//  PBOrderMessageCell.m
//  PBHomeDemo
//
//  Created by Playboy on 2018/1/12.
//  Copyright © 2018年 tmkj. All rights reserved.
//

#import "PBOrderMessageCell.h"
#import "IQTextView.h"

@interface PBOrderMessageCell ()<UITextViewDelegate>

@property (strong, nonatomic) IBOutlet IQTextView *textView;

@end

@implementation PBOrderMessageCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.textView.delegate = self;
    self.textView.placeholder = @"更多看房或者找房需求（选填）";
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

#pragma mark - UITextViewDelegate
- (BOOL)textViewShouldEndEditing:(UITextView *)textView {
    NSLog(@"%@",textView.text);
    if (self.delegate && [self.delegate respondsToSelector:@selector(backWithMessage:)]) {
        [self.delegate backWithMessage:textView.text];
    }
    return YES;
}

@end
